#include <stdio.h>
#include "../common/common.h"

int main (void){
	cudaDeviceProp prop;
	int dev;

	SAFE_CALL( cudaGetDevice(&dev) );
	printf("ID cua device hien tai: %d\n", dev);
	
	memset(&prop, 0, sizeof( cudaDeviceProp ));
	prop.major = 1;
	prop.minor = 3;

	SAFE_CALL( cudaChooseDevice(&dev, &prop) );
	printf("ID cua device duoc chon: %d\n", dev);
	SAFE_CALL( cudaSetDevice(dev) );
}